/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class PreguntaCriteria extends AbstractORMCriteria {
	public final BooleanExpression respuesta;
	public final StringExpression descripPreg;
	
	public PreguntaCriteria(Criteria criteria) {
		super(criteria);
		respuesta = new BooleanExpression("respuesta", this);
		descripPreg = new StringExpression("descripPreg", this);
	}
	
	public PreguntaCriteria(PersistentSession session) {
		this(session.createCriteria(Pregunta.class));
	}
	
	public PreguntaCriteria() throws PersistentException {
		this(orm.BabyManagerPersistentManager.instance().getSession());
	}
	
	public EncuestaCriteria createIdPreguntaCriteria() {
		return new EncuestaCriteria(createCriteria("ORM_IdPregunta"));
	}
	
	public Pregunta uniquePregunta() {
		return (Pregunta) super.uniqueResult();
	}
	
	public Pregunta[] listPregunta() {
		java.util.List list = super.list();
		return (Pregunta[]) list.toArray(new Pregunta[list.size()]);
	}
}

